package cn.com.klun.tjy.web.controller;

import cn.com.klun.tjy.dubbo.MainForceEffectStockService;
import cn.com.klun.tjy.dubbo.bean.TjyParametersVo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.portlet.ModelAndView;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


/**
 * 主页推荐显示
 */
@Controller
@RequestMapping("/main")
public class MainHomeController {

    private static final Logger logger = LoggerFactory.getLogger(MainHomeController.class);

    @Resource
    private MainForceEffectStockService mainForceEffectStockService;

    @RequestMapping("/index")
    public String testDao(HttpServletRequest request, HttpServletResponse response, ModelAndView modelAndView){
        // 查询今日推荐股票
        TjyParametersVo tjyParametersVo = new TjyParametersVo();
        TjyParametersVo effect = mainForceEffectStockService.getEffect(tjyParametersVo);
        modelAndView.addObject(effect);
        return "index";
    }
}
